﻿#define _CRT_SECURE_NO_WARNINGS 1

//编程初学者入门训练第112题
//BC114 小乐乐排电梯
//https://www.nowcoder.com/practice/0f855c7642b74cccb3c2366bb7732d2a?tpId=107&tqId=33395&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3Fpage%3D3%26tpId%3D107%26type%3D107&difficulty=undefined&judgeStatus=undefined&tags=&title=

#include <stdio.h>

int main() {
    int n = 0;
    scanf("%d", &n);

    if (n < 12) {
        printf("2\n");
    }
    else {
        int minute = 0;
        while (n >= 12) {
            minute += 4;
            n -= 12;
        }
        minute += 2;
        printf("%d\n", minute);
    }
    return 0;
}
